#ifndef _SHAPE_FORMAT_H_
#define _SHAPE_FORMAT_H_

#include <stdint.h>

typedef enum {
    SHAPE_TYPE_NONE = 0,
    SHAPE_TYPE_LINE,
    SHAPE_TYPE_RECT,
    SHAPE_TYPE_CIRCLE,
    SHAPE_TYPE_SECTOR, //扇形
    SHAPE_TYPE_PROCESSBAR, //进度条
    SHAPE_TYPE_SWITCH,
} ShapeType;

struct Line {
   int32_t xBegin;
   int32_t yBegin;
   int32_t xEnd; 
   int32_t yEnd;
};

struct Rect {
    int32_t x;
    int32_t y;
    int32_t width;
    int32_t height;
};

struct Circle {
    int32_t x;
    int32_t y;
    int32_t radius;
};

struct ShapeLine : public Line {
    int32_t size;
};

struct ShapeRect : public Rect {
    int32_t size; //为0时完全填充,否则画框
    int32_t radius; //圆角半径
};

struct ShapeCircle : public Circle {
    int32_t radius; //外经
    int32_t radius2; //内经,大于0时画圆环
    int32_t div; //分块
    int32_t divBegin;
    int32_t divEnd;
};


#endif // _SHAPE_FORMAT_H_
